# coding:utf8
import allure

def attach_response_to_allure(response):
    """
    将接口响应的相关信息添加到Allure报告中作为附件展示。

    :param response: requests库的Response对象
    """
    if response:
        allure.attach(str(response.status_code), "Status Code", allure.attachment_type.TEXT)
        allure.attach(response.text, "Response Body", allure.attachment_type.TEXT)